home *** CD-ROM | disk | FTP | other *** search
- " ------------------------------------------------------------------- "
- " GadgetActivation Class is a Singleton class that allows the user to "
- " reference Gadget Activation flags without having to remember their "
- " actual hexadecimal values. "
- " ------------------------------------------------------------------- "
-
- Class GadgetActivation :Dictionary ! uniqueInstance !
- [
- privateNew ! newinstance !
- newinstance <- super new.
-
- ^ newinstance
- |
- new
- ^ (self privateSetup)
- |
- privateSetup
- (uniqueInstance isNil)
- ifTrue: [uniqueInstance <- self privateNew.
-
- self at: #GACT_STRINGLEFT put: 0.
- self at: #GACT_RELVERIFY put: 1.
- self at: #GACT_IMMEDIATE put: 2.
- self at: #GACT_ENDGADGET put: 4.
- self at: #GACT_FOLLOWMOUSE put: 8.
-
- self at: #GACT_RIGHTBORDER put: 16r10.
- self at: #GACT_LEFTBORDER put: 16r20.
- self at: #GACT_TOPBORDER put: 16r40.
- self at: #GACT_BOTTOMBORDER put: 16r80.
-
- self at: #GACT_TOGGLESELECT put: 16r100.
- self at: #GACT_STRINGCENTER put: 16r200.
- self at: #GACT_STRINGRIGHT put: 16r400.
- self at: #GACT_LONGINT put: 16r800.
-
- self at: #GACT_ALTKEYMAP put: 16r1000.
- self at: #GACT_BOOLEXTEND put: 16r2000.
- self at: #GACT_STRINGEXTEND put: 16r2000.
- self at: #GACT_ACTIVEGADGET put: 16r4000.
-
- "Neither set nor rely on this bit:"
-
- self at: #GACT_BORDERSNIFF put: 16r8000.
- ].
-
- ^ self "uniqueInstance??"
- ]
-